package pers.hl.lib_global.mvvm

import pers.hl.common.base.BaseModel
import pers.hl.lib_global.http.LibHttpClient
import pers.hl.lib_global.http.WanHttpClient
import pers.hl.lib_global.http.WanResponse

open class WanModel : BaseModel() {

    val libService by lazy {
        LibHttpClient.getLibService()
    }

    suspend fun <T : Any> wanApiCall(call: suspend () -> WanResponse<T>) : WanResponse<T> {
        return call.invoke()
    }

}